<f:if condition="{configuration.insertAbove}">
	<f:render section="paginator" arguments="{pagination: pagination,configuration:configuration}" />
</f:if>

<f:renderChildren arguments="{contentArguments}" />

<f:if condition="{configuration.insertBelow}">
	<f:render section="paginator" arguments="{pagination: pagination,configuration:configuration}" />
</f:if>
<f:section name="paginator">
	<f:if condition="{pagination.numberOfPages} > 1">
		<div class="row DTTTFooter">
            <div class="col-sm-6">
            </div>
            <div class="col-sm-6">
            <div id="editabledatatable_paginate" class="dataTables_paginate paging_bootstrap">
                <ul class="pagination">
                <f:if condition="{pagination.previousPage}">
                    <li>
                    <f:if condition="{pagination.previousPage} > 1">
                        <f:then>
                            <f:widget.link class="fg-button ui-button ui-state-default" action="index" arguments="{currentPage: pagination.previousPage}">上一页</f:widget.link>   
                        </f:then>
                        <f:else>                            
                            <f:widget.link class="fg-button ui-button ui-state-default" action="index" >上一页</f:widget.link>
                        </f:else>
                    </f:if>
                    </li>
                </f:if>
                <f:if condition="{pagination.displayRangeStart} > 1">
                    <li>
                        <f:widget.link class="fg-button ui-button ui-state-default" action="index" >1</f:widget.link>
                    </li>
                </f:if>
                <f:if condition="{pagination.hasLessPages}">
                    <li>...</li>
                </f:if>
                
                <f:for each="{pagination.pages}" as="page">
                    <f:if condition="{page.isCurrent}">
                        <f:then>
                            <li class="active">
                                <f:widget.link class="fg-button ui-button ui-state-default ui-state-disabled" action="index" >{page.number}</f:widget.link>
                            <li>
                        </f:then>
                        <f:else>
                            <li>
                            <f:if condition="{page.number} > 1">
                                <f:then>
                                    <f:widget.link class="fg-button ui-button ui-state-default" arguments="{currentPage: page.number}" action="index" >{page.number}</f:widget.link>
                                </f:then>
                                <f:else>
                                    <f:widget.link class="fg-button ui-button ui-state-default" action="index" >{page.number}</f:widget.link>
                                </f:else>
                            </f:if>
                            </li>
                        </f:else>
                    </f:if>
                </f:for>
                
                <f:if condition="{pagination.hasMorePages}">
                   <li>...</li>
                </f:if>
                <f:if condition="{pagination.displayRangeEnd} < {pagination.numberOfPages}">
                    <li>
                        <f:widget.link class="fg-button ui-button ui-state-default" arguments="{currentPage: pagination.numberOfPages}" action="index" >{pagination.numberOfPages}</f:widget.link>
                    </li>
               </f:if>
                <f:if condition="{pagination.nextPage}">
                    <li>
                        <f:widget.link class="fg-button ui-button ui-state-default" arguments="{currentPage: pagination.nextPage}" action="index" >下一页</f:widget.link>
                    </li>
                </f:if>
                </ul>
            </div>
           </div>
		</div>
	</f:if>
</f:section>